Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

171
Vistas
I'm trying to make a discord bot receive this error [Symbol(code)]: 'BITFIELD_INVALID'

Following is the code snippet I am trying:

const Discord = require("discord.js");
const client = new Discord.Client({intents:["GUILD_VOICE_STATES","VOICE_STATE_UPDATE"]});
const config = require("./config.json");

client.login(config.token);
about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

From the guide

To enable your intents,

const client = new Client({ intents: [Intents.FLAGS.GUILD_VOICE_STATES] });

You will also have to require the Intents class,

const { Discord, Intents } = require("discord.js");

Most importantly however, "VOICE_STATE_UPDATE" is not an intent, its an event that can only be received with the GUILD_VOICE_STATE intent

about 4 years ago · Juan Pablo Isaza Denunciar

0

VOICE_STATE_UPDATE is not a valid intent. The GUILD_VOICE_STATES is what you want (you have this but VOICE_STATE_UPDATE is invalid). These are the intents you should have to track voice states:

  • GuildMember intents
  • Voice states

Therefore this is how you should declare client

const client = new Discord.Client({
  intents: [
    "GUILD_VOICE_STATES",
    "GUILDS",
    "GUILD_MEMBERS"
  ]
})
//GUILDS is required for some other intents like messages and members
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda